package com.example.demo3.utils;

import com.example.demo3.domain.vo.UserVo;
import org.apache.shiro.SecurityUtils;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;


public class BaseEntity {



    public String createBy ;

    public Date createTime ;

    public String updateBy ;

    public Date updateTime;




    public void  getCreate()  {
        UserVo user=(UserVo) SecurityUtils.getSubject().getPrincipal();
        createBy = user.getUserName();
        createTime = new Date(System.currentTimeMillis());
        getUpdate();
    }

    public void  getUpdate()    {
        UserVo user=(UserVo) SecurityUtils.getSubject().getPrincipal();
        updateBy = user.getUserName();
        updateTime = new Date(System.currentTimeMillis());
    }


}
